package com.wewoo.log4e.test.entity;


import com.baomidou.mybatisplus.annotation.TableName;
import com.github.javafaker.Faker;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Locale;

/**
 * <p>
 *
 * </p>
 *
 * @author jin.tang
 * @since 2021-12-03
 */
@TableName("sys_user")
public class SysUserEntity implements Serializable {
    /**
     * faker 指定汉语，默认英语
     */
    private static Faker FAKER = new Faker(Locale.CHINA);

    private static final long serialVersionUID = 1L;

    private Long id;

    private String userName;

    private String password;

    private String loginName;

    private String email;

    private String phone;

    /**
     * 头像
     */
    private String avatar;

    private LocalDateTime createTime;

    private Long createBy;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    @Override
    public String toString() {
        return "SysUserEntity{" +
                "id=" + id +
                ", userName=" + userName +
                ", password=" + password +
                ", loginName=" + loginName +
                ", email=" + email +
                ", phone=" + phone +
                ", avatar=" + avatar +
                ", createTime=" + createTime +
                ", createBy=" + createBy +
                "}";
    }

    public static SysUserEntity genTestObject() {
        SysUserEntity sysUser = new SysUserEntity();
        sysUser.setId(FAKER.number().randomNumber());
        sysUser.setUserName(FAKER.name().fullName());
        sysUser.setEmail("1111");
        return sysUser;
    }
}
